public class Demo2 {

    public static void main(String[] args) {
        //3.字符型
        char g = 'a';
        char h = '哈';
        System.out.println(g);
        System.out.println(h);
        //char的包装类为Character
        System.out.println(Character.MAX_VALUE);
        System.out.println(Character.MIN_VALUE);
        //java中用unicode表示字符

        //4.布尔类型
        //0为真非0为假，但是java中只有true和false
        boolean x = true;
        //不存在类型的转换，
        System.out.println(x);
    }
    public static void main2(String[] args) {

        //1.整型
        //整型(4)
        int a = 10;
        //长整型(8)
        long b = 20L;

        System.out.println(a);
        System.out.println(b);

        System.out.println(Long.MAX_VALUE);
        System.out.println(Long.MIN_VALUE);

        //短整型(2)
        short c = 30;

        System.out.println(c);
        System.out.println(Short.MAX_VALUE);
        System.out.println(Short.MIN_VALUE);

        //字节型(1)
        byte d = 40;
        System.out.println(d);
        System.out.println(Byte.MAX_VALUE);
        System.out.println(Byte.MIN_VALUE);

        //2.浮点型
        //浮点型没法做到精确，只能精确到某一位
        //float:单精度浮点型

        float e = 11.1f;//如果不加f默认为double类型

        //double:双精度浮点型
        double f = 12.4;

        System.out.println(e);
        System.out.println(f);
        System.out.println(Double.MAX_VALUE);
        //输出的是一个非负最小值
        System.out.println(Double.MIN_VALUE);


    }
}


class MyClass{
    int func()
    {
        int a = 10;
        return a;
    }
}